package com.zxj.geekstudy.spring;


import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.*;

@Aspect
public class Aop2 {
    
    @Pointcut(value="execution(* com.zxj.geekstudy.*.aop2.Strawberry.test*(..))")
    public void point(){
        
    }
    
    @Before(value="point()")
    public void before(){
        System.out.println("========>begin aop2...");
    }
    
    @AfterReturning(value = "point()")
    public void after(){
        System.out.println("========>after aop2...");
    }
    
    @Around("point()")
    public void around(ProceedingJoinPoint joinPoint) throws Throwable{
        System.out.println("    ====>around before aop1:" + joinPoint.toShortString()); //1
        joinPoint.proceed();
        System.out.println("    ====>around after aop1:" + joinPoint.toShortString()); //3
        
    }
    
}
